package dfbz.homework1;

import java.util.ArrayList;
import java.util.Scanner;

public class Test08 {
    public static void main(String[] args) {
        ArrayList<Book> book=new ArrayList<>();
        Scanner sc=new Scanner(System.in);
        for (int i = 1; i <4; i++) {
            System.out.println("请录入第"+i+"本书的名称:");
            String bookName=sc.next();
            System.out.println("请录入第"+i+"本书的ISBN的编号:");
            String isbnNum=sc.next();
            System.out.println("请录入第"+i+"本书的价格:");
            double bookPrice=sc.nextInt();
            Book b=new Book(bookName,isbnNum,bookPrice);
            book.add(b);
        }
        for (int i = 0; i <book.size() ; i++) {
            System.out.println(book.get(i).getTitle()+","+book.get(i).getIsbn()+","+book.get(i).getPrice());
        }
    }
}
